<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%
    Object user = request.getAttribute("user");
%>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="/static/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/static/themes/icon.css">
    <script type="text/javascript" src="/static/jquery-1.9.1.js"></script>
    <script type="text/javascript" src="/static/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="/static/common.js"></script>
    <style>
        .fl{float: left;}
        .fr{float: right;}
        .clear{clear: both;}
        .head{
            width: 100%;
            height: 50px;
            background-color: #3072f6;
        }

        .head_right{
            float: right;
            height: 50px;
            line-height: 50px;
            text-decoration: none;
            margin-right: 10px;
            color: #FFFFFF;
        }

        .logo{
            line-height: 50px;
            font-size: 30px;
            font-weight: 900;
            margin-left: 95px;
            float: left;
            text-decoration:none;
            color:#FFFFFF;
        }
    </style>
</head>
<body>
    <div class="head">
        <a href="/" class="logo">威海市YY房产</a>
        <c:if test="${user == null}">
            <a href="/login" class="head_right">登录</a>
        </c:if>
        <c:if test="${user != null}">
            <a href="/personal" class="head_right">个人中心</a>
            <a href="/loginOut" class="head_right">注销</a>
            <c:if test="${user.role == 'admin'}">
                <a href="/admin/index" class="head_right">管理中心</a>
            </c:if>
        </c:if>
    </div>
</body>
</html>